﻿using Dal;
using Model;

namespace Bll
{
    public class adminBll
    {
        private readonly adminDal dal;

        public adminBll(adminDal dal)
        {
            this.dal = dal;
        }

        /// <summary>
        /// 注册
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public int PostRegister(T_Admin info)
        {
            try
            {
               return dal.PostRegister(info);
            }
            catch (Exception)
            {
                throw;
            }
        }

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public T_Admin GetLogin(string name, string pwd)
        {
            try
            {
               return dal.GetLogin(name, pwd);
            }
            catch (Exception)
            {
                throw;
            }
        }

    }
}